home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 1833 / 1833.xpi / chrome / m / yoono.com / sidebar.jar / sidebar / js / yoodgetwrapper.js < prev   
Text File  |  2009-12-16  |  21KB  |  1 lines

  1. function YoodgetWrapper(){this.domElt=null;this.firstLoad=true;this.titleElt=null;this.iconUrl=null;this.url="";this.title="";this.iframe=null;this.yoodgetWindow=null;this.yoodget=null;this.yuid="";this.instance=-1;this.thinWrapperElt=null;this._thinTemplate=$("thinyoodget-template");this._thinContainer=$("thinyoodgetcontainer");var a=window.location.href;this.rootUrl=a.substr(0,a.lastIndexOf("/"))+"/";this.view="block";this.openerType="Sidebar";this.sidebar=null;this.externalYoodget=false;this.toggleViewStart=0;this.minHeight=0;this.maxHeight=0;this.height=0;this.userHeight=0;this._visiblePosition=0;this.yoodgetInitCode="";this.yoodgetInitTitle=""}YoodgetWrapper.prototype.MANUAL_RESIZE="manual";YoodgetWrapper.prototype.AUTO_RESIZE="auto";YoodgetWrapper.prototype.UP="up";YoodgetWrapper.prototype.DOWN="down";YoodgetWrapper.prototype.init=function(i,a,c){try{this.parent=i;this.YEXTIF=this.parent.YEXTIF;var d=50;if("delay" in a){d=a.delay}this.url=a.url;this.view=a.view;this.yuid=a.yuid;this.minHeight=a.minHeight;this.maxHeight=a.maxHeight;var k=a.height;if(!k){var j=this.yuid+"{"+a.instance+"}YoonoConfigHeight";k=this.YEXTIF.execFct("getKeyValue",j);if(!k){j=this.yuid+"{"+0+"}YoonoConfigHeight";k=this.YEXTIF.execFct("getKeyValue",j)||200}this.YEXTIF.execFct("deleteKeyValue",j)}this.userHeight=a.userHeight||k;this.instance=a.instance;this.openerType=this.getWindowType();if("icon" in a){this.setIconUrl(a.icon)}else{this.setIconUrl(this.url.substr(0,this.url.lastIndexOf("/")+1)+"img/icon.png")}if(("code" in a)&&a.code){this.yoodgetInitCode=a.code;this.yoodgetInitTitle=a.title}this.template=this.parent.template;this.container=this.parent.yoodgetListElt;this.domElt=this.template.cloneNode(true);this.domElt.yoodgetWrapper=this;if(c&&this.container.firstChild){this.container.insertBefore(this.domElt,this.container.firstChild)}else{this.container.appendChild(this.domElt)}var b=this.domElt.parentNode.childNodes.length;this.domElt.setAttribute("id","yoodgetwrapper_"+b);this.makeThinYoodgetWrapper(c,b);this.parent.refreshVisibleWrapperList();this.sidebar=i;this.setHeight(k);this.resizeHandle=$(yoono.dom.down(this.domElt,"ywresize-handle"));var f=this.domElt.getElementsByTagName("IFRAME");if(f&&f[0]){this.iframe=f[0];this.setHeight(k);var h=this;setTimeout(function(){if(!h.iframe.contentWindow){return}h.iframe.src=h.getYoodgetUrl();yoono.event.addEventListener(h.iframe,"load",function(){h.frameLoaded()},true)},d)}this.titleElt=$(yoono.dom.down(this.domElt,"ywtitle"));this.resizeHandle=$(yoono.dom.down(this.domElt,"ywresize-handle"))}catch(g){this.YEXTIF.logError("YoodgetWrapper.init: "+g);this.close()}};YoodgetWrapper.prototype.getYoodgetUrl=function(){return(this.url)};YoodgetWrapper.prototype.getVisiblePosition=function(){return(this._visiblePosition)};YoodgetWrapper.prototype.setVisiblePosition=function(a){this._visiblePosition=a};YoodgetWrapper.prototype.getThinWrapperElt=function(){return(this.thinWrapperElt)};YoodgetWrapper.prototype.makeThinYoodgetWrapper=function(a,f){var b=null;try{b=this._thinTemplate.cloneNode(true);b.setAttribute("id","thinwrapper_"+f);b.wrapperElt=this.domElt;if(a&&this._thinContainer.firstChild){this._thinContainer.insertBefore(b,this._thinContainer.firstChild)}else{this._thinContainer.appendChild(b)}var c="btn-"+this.url.substr(0,this.url.lastIndexOf("/"));yoono.dom.addClassName(b,c);b.iconElt=$(yoono.dom.down(b,"ywicon"));b.iconElt.src=this.getIconUrl();b.iconNotificationElt=$(yoono.dom.down(b,"ywicon-notification-counter"));this.thinWrapperElt=b;if(this.warningOn){this.warningStop();this.warningStart()}ynSidebar.setSortable()}catch(d){YServices.log.error("YoodgetWrapper.makeThinYoodgetWrapper: "+d)}return(b)};YoodgetWrapper.prototype.getDomElt=function(){return(this.domElt)};YoodgetWrapper.prototype.isThin=function(){var a=false;if(this.sidebar){a=this.sidebar.thin&&(!this.isPinnedDown())}return(a)};YoodgetWrapper.prototype.playSound=function(a){if(Prototype.Browser.IE){if(!a){a="sounds/default.wav"}Sound.play(a)}else{if(!a){a="chrome://yoonosb/content/sounds/default.wav"}this.YEXTIF.execFct("playSound",a)}};YoodgetWrapper.prototype.warningStart=function(a){this.warningOn=true;if(typeof a=="number"){if(a>0){yoono.dom.addClassName(this.thinWrapperElt.iconNotificationElt,"has-value");this.thinWrapperElt.iconNotificationElt.innerHTML=a}else{yoono.dom.removeClassName(this.thinWrapperElt.iconNotificationElt,"has-value")}}else{if(this.thinWrapperElt){YTools.warningStart(this.thinWrapperElt.iconElt)}}};YoodgetWrapper.prototype.warningStop=function(){this.warningOn=false;if(this.thinWrapperElt){YTools.warningStop(this.thinWrapperElt.iconElt)}};YoodgetWrapper.prototype.closeThinWrapper=function(){if(this.thinWrapperElt){this.thinWrapperElt.parentNode.removeChild(this.thinWrapperElt)}};YoodgetWrapper.prototype.getIconUrl=function(){return(this.iconUrl)};YoodgetWrapper.prototype.setIconUrl=function(a){this.iconUrl=a};YoodgetWrapper.prototype.updateUserHeight=function(){this.userHeight=this.getHeight()};YoodgetWrapper.prototype.resizeBy=function(f,g){var d=true;var e=this.getHeight();var a=e-f;var c=this.setHeight(a);if(e==c){var b=this.getNextResizableSibling(g);if(b){d=b.resizeBy(f,g)}else{d=false}}this.updateUserHeight();return(d)};YoodgetWrapper.prototype.getNextResizableSibling=function(d){var a=null;var b=1;if(d==YoodgetWrapper.prototype.UP){b=-1}var c=this.getVisiblePosition()+b;if(c in this.sidebar.visibleWrappers){a=this.sidebar.visibleWrappers[c]}return(a)};YoodgetWrapper.prototype.manualResize=function(f,c){if(this.getVisiblePosition()==this.sidebar.visibleWrappers.length-1){return}var d=c.screenY;var h=d;var e=this.getHeight();var a=this;function g(n){var l=false;var o=n.screenY-d;var m=h-n.screenY;h=n.screenY;if(!o){return}var r=e+o;var p=(o>0)?YoodgetWrapper.prototype.DOWN:YoodgetWrapper.prototype.UP;var j=null;var s=a.getNextResizableSibling(YoodgetWrapper.prototype.DOWN);if(YoodgetWrapper.prototype.UP==p){j=a.getNextResizableSibling(YoodgetWrapper.prototype.UP)}var k=a.getHeight();if(r==k){return}var i=a.setHeight(r);var q=i-k;if(!q&&(YoodgetWrapper.prototype.DOWN==p)){return}if(!q&&o&&j){q=-m;l=j.resizeBy(-q,p);if(!l){return}}if(s){l=s.resizeBy(q,p);if(!l){a.setHeight(r-q)}}}function b(i){if(document.removeEventListener){document.removeEventListener("mousemove",g,true);document.removeEventListener("mouseup",b,true)}else{f.detachEvent("onlosecapture",b);f.detachEvent("onmouseup",b);f.detachEvent("onmousemove",g);f.releaseCapture()}if(i.stopPropagation){i.stopPropagation()}else{i.cancelBubble=true}a.sidebar.fixLayout(Sidebar.prototype.YOODGET_RESIZED,null);a.sidebar.saveYoodgetOnTimer();a.updateUserHeight()}if(document.addEventListener){document.addEventListener("mousemove",g,true);document.addEventListener("mouseup",b,true)}else{f.setCapture();f.attachEvent("onmousemove",g);f.attachEvent("onmouseup",b);f.attachEvent("onlosecapture",b)}if(c.stopPropagation){c.stopPropagation()}else{c.cancelBubble=true}if(c.preventDefault){c.preventDefault()}else{c.returnValue=false}};YoodgetWrapper.prototype.frameLoaded=function(){this.YEXTIF.logDebug("YoodgetWrapper.frameLoaded");var a=this;if(this.iframe.contentWindow){this.setIFrame(this.iframe.contentWindow)}else{if(Prototype.Browser.IE){this.YEXTIF.execFct("getSidebarIFrameWindow",[this.url,a])}}};YoodgetWrapper.prototype.dndManager={onDrop:function(j,k,i){var f=k.data;var h=j.target;var a=false;do{if(!("getAttribute" in h)){continue}a=h.getAttribute("onDropMethod")||false}while(!a&&(h=h.parentNode));var b=i.sourceNode;if(a){var c=window.dropTarget.yoodget;if(a in c){YServices.log.debug("DROPPED "+f+" on "+h.className+" from "+c.name+" for "+a);try{var d=c.formatDroppedMessage(b,f);if(d!=null){c[a].call(c,j,b,h,f,d)}}catch(g){YServices.log.error("YoodgetWrapper.onDropMethod for "+c.name+": "+g)}}else{YServices.log.error("YoodgetWrapper.dndManager.onDrop : method "+a+" not in yoodget "+c.name)}}},getSupportedFlavours:function(){var a=new FlavourSet();a.appendFlavour("text/unicode");a.appendFlavour("video");a.appendFlavour("text/html");return a},onDropIE:function(a){try{a.returnValue=false;var h=a.srcElement;var i="";do{if(!("getAttribute" in h)){continue}i=h.getAttribute("onDropMethod")||false}while(!i&&(h=h.parentNode));if(i){var g=window.dropTarget.yoodget;var d=g.YEXTIF.execFct("getDragElement");if(d&&d.getElementsByTagName("IMG").length>0){d=d.getElementsByTagName("IMG")[0]}var c=a.dataTransfer.getData("Text");if(i in g){YServices.log.debug("DROPPED "+c+" on "+h.className+" from "+g.name+" for "+i);var b=g.formatDroppedMessage(d,c);g[i].call(g,a,d,h,c,b)}else{YServices.log.debug("YoodgetWrapper.onDropIE: "+i+" not in yoodget, or yoodget not found")}}else{YServices.log.debug("YoodgetWrapper.onDropIE: no onDropMethod attribute ")}}catch(f){YServices.log.exception("YoodgetWrapper.onDropIE "+f.description)}}};YoodgetWrapper.prototype.sanitizeCommonKey=function(a){var b="{common}"+a;return(b)};YoodgetWrapper.prototype.getMinHeight=function(){if(this.yoodget){this.minHeight=this.yoodget.getMinHeight()}return(this.minHeight)};YoodgetWrapper.prototype.getHeight=function(){return(this.height)};YoodgetWrapper.prototype.getMaxHeight=function(){if(this.yoodget){this.maxHeight=this.yoodget.getMaxHeight()}return(this.maxHeight)};YoodgetWrapper.prototype.getYuidi=function(){return(this.yuid+"{"+this.instance+"}")};YoodgetWrapper.prototype.mkPrivateKey=function(a){return(this.getYuidi()+a)};YoodgetWrapper.prototype.setIFrame=function(c){this.yoodgetWindow=c;var a=this;try{this.YEXTIF.logDebug("YoodgetWrapper.setIFrame "+this.openerType);c.logDebug=function(d){a.YEXTIF.logDebug(d)};c.logError=function(d){a.YEXTIF.logError(d)};c.logException=function(d,e){a.YEXTIF.logException(d,e)};c.ynWrapper=new Object();c.ynWrapper.centeredWarning=function(d){a.centeredWarning(d)};c.ynWrapper.isAnonymousUser=function(){var d=true;var e=a.YEXTIF.execFct("getUserCredential");if(e){d=e.anonymous}return(d)};c.ynWrapper.refreshHeight=function(){a.refreshHeight()};c.ynWrapper.getInstance=function(){return(a.instance)};c.ynWrapper.setTitle=function(d){a.setTitle(d)};c.ynWrapper.setIcon=function(d){a.setIconUrl(d);a.thinWrapperElt.iconElt.src=d};c.ynWrapper.isThin=function(){return a.isThin()};c.ynWrapper.singletonPopup=function(e,h,g,f,d){a.singletonPopup(e,h,g,f,d)};c.ynWrapper.playSound=function(d){a.playSound(d)};c.ynWrapper.warningStart=function(d){a.warningStart(d)};c.ynWrapper.warningStop=function(){a.warningStop()};c.ynWrapper.getSidebarId=function(){if(a.sidebar){return a.sidebar.getId()}return null};c.ynWrapper.logoutSidebar=function(){if(a.sidebar){return a.sidebar.signIn_disableSidebar_callback()}return null};c.ynWrapper.highlightYoodget=function(){if(a.sidebar){a.sidebar.showOnlyOneYoodget(a.thinWrapperElt);a.sidebar.doFixLayout(Sidebar.prototype.YOODGET_PINNED_DOWN,a);return(true)}return(false)};c.ynWrapper.addShortcut=function(d){d.senderYuid=a.yuid;d.senderInstance=a.instance;d.title=a.title;if(a.sidebar){a.sidebar.addShortcut(d)}};c.ynWrapper.removeShortcut=function(d){if(a.sidebar){a.sidebar.removeShortcut(d)}};c.ynWrapper.showConfig=function(d){a.sidebar.showConfig(d)};c.ynWrapper.close=function(){a.close()};c.ynWrapper.addFriends=function(){a.sidebar.addYoodgetFriends()};c.ynWrapper.setCommonKeyValue=function(d,e){e=e||"";var f=a.sanitizeCommonKey(d);a.YEXTIF.execFct("setKeyValue",[f,e])};c.ynWrapper.getCommonKeyValue=function(d){var e=a.sanitizeCommonKey(d);return(a.YEXTIF.execFct("getKeyValue",e))};c.ynWrapper.deleteCommonKeyValue=function(d){var e=a.sanitizeCommonKey(d);return(a.YEXTIF.execFct("deleteKeyValue",e))};c.ynWrapper.setKeyValue=function(d,e){e=e||"";var f=a.mkPrivateKey(d);a.YEXTIF.execFct("setKeyValue",[f,e])};c.ynWrapper.getKeyValue=function(d){var e=a.mkPrivateKey(d);return(a.YEXTIF.execFct("getKeyValue",e))};c.ynWrapper.deleteKeyValue=function(d){var e=a.mkPrivateKey(d);return(a.YEXTIF.execFct("deleteKeyValue",e))};c.ynWrapper.getKeyValueList=function(f){var g=a.getYuidi();var i=a.mkPrivateKey(f);var d=a.YEXTIF.execFct("getKeyValueList",i);var e=new Object;for(f in d){if(0==f.indexOf(g)){var h=f.substr(g.length);e[h]=d[f]}}return(e)};c.ynWrapper.callYoodget=function(f,e,i,h){var g=a.yoodget.pk;if("sidebar"==g){return}if("extension"==g){return}var d=null;d=a.sidebar.callYoodget(g,f,e,i,h);return(d)};c.ynWrapper.setView=function(d,e){a.setView(d,e)};c.ynWrapper.loadAPI=function(d,o,j,p,f,l){try{var k=a.rootUrl+"js/yloader.js";var m=o.createElement("script");var g=null;var n=o.getElementsByTagName("HEAD");if(!n){g=o.createElement("head");o.getElementsByTagName("html").appendChild(g)}else{g=n[0]}if(Prototype.Browser.IE){m.onreadystatechange=function(){if(this.readyState=="complete"){setTimeout(function(){d.YoonoLoader.load(k,g,j,p,f,l)},0)}}}else{m.onload=function(){d.YoonoLoader.load(k,g,j,p,f,l)}}m.src=k;g.appendChild(m)}catch(i){a.YEXTIF.logError("window.ynWrapper.loadAPI: "+i)}};c.ynWrapper.sliderCheck=function(d){Event.observe(a.iframe,"mouseout",function(e){var f=Event.element(e);if(("IFRAME"==f.nodeName)&&d.dragging&&d.active){d.finishDrag(e,true)}},true)};c.ynWrapper.isFirstLoad=function(){return(a.firstLoad)};c.ynWrapper.switchToYoodget=function(d){a.sidebar.switchToYoodget(d)};c.ynWrapper.initExternalYoodget=function(){if(a.yoodgetInitCode&&("injectCode" in a.yoodget)){a.yoodget.injectCode(a.yoodgetInitCode,a.getIconUrl(),a.yoodgetInitTitle);a.yoodgetInitCode=""}};c.ynWrapper.isExternalYoodget=function(){return(a.externalYoodget)};c.ynWrapper.setSkin=function(d){if(a.skin!=d){yoono.dom.removeClassName(a.domElt,"skin-"+a.skin);yoono.dom.addClassName(a.domElt,"skin-"+d);a.skin=d}};c.ynWrapper.registerYoodget=function(j){try{if(!j.yuid){a.YEXTIF.logError("yuid not defined for yoodget "+j.name);alert("yuid not defined for yoodget '"+j.name+"' : removing");a.close();return}a.yoodget=j;a.yuid=j.yuid;if(a.instance!=-1){a.firstLoad=false}j.instance=YServices.yoodgetInstances.registerYoodgetInstance(a);a.instance=j.instance;if(a.externalYoodget&&(0!=a.url.indexOf("chrome://"))){var g=a.yuid.replace(/\{[^@]*@([^\}]*)}/,"$1");var h=a.url.replace(/http:\/\/.*\.([^\.]*\.[^\/]*)\/.*/,"$1");if(h!=g){alert("Yoodget yuid '"+a.yuid+"' does not match Yoodget Host, removing.");a.close();return}}a.publishInterfaces(j);var f="FirstDisplayDate"+a.yuid;var d=a.sidebar.getKeyValue(f);if(!d){a.sidebar.setKeyValue(f,new Date().getTime())}if(Prototype.Browser.IE){yoono.event.addEventListener(j.doc.body,"drop",function(k){try{window.dropTarget=a;a.dndManager.onDropIE(k)}catch(l){logError("Wrapper drop handler: "+l.description)}},true);yoono.event.addEventListener(j.doc.body,"dragenter",function(e){e.returnValue=false},true);yoono.event.addEventListener(j.doc.body,"dragover",function(e){e.returnValue=false},true)}else{yoono.event.addEventListener(j.doc.body,"dragdrop",function(k){try{window.dropTarget=a;var l=nsDragAndDrop.mDragSession.sourceNode;var n=k.target;if(l.ownerDocument==n.ownerDocument){return}nsDragAndDrop.drop(k,a.dndManager)}catch(m){YServices.log.exception("Wrapper drop handler: "+m)}},true)}if(!j.resizableElt){if(a.resizeHandle){a.resizeHandle.style.display="none"}}switch(a.view){case"reduced":case"block":if(a.isPinnedDown()){a.setView(a.view)}break;default:a.setHeight(a.getHeight())}if(Prototype.Browser.IE){}if(a.sidebar.thin&&!a.isPinnedDown()){a.setThin()}a.sidebar.saveYoodgetOnTimer()}catch(i){a.YEXTIF.logError("window.ynWrapper.registerYoodget: "+i)}};YServices.core.initSubDocument(c,"loadYoonoApi",[])}catch(b){this.YEXTIF.logError("YoodgetWrapper.setIFrame: "+b+"\n"+b.stack)}};YoodgetWrapper.prototype.refreshHeight=function(){var a=this.yoodget.doc.body.offsetHeight;this.setHeight(a)};YoodgetWrapper.prototype.publishInterfaces=function(c){try{c.YEXTIF=new ExternalInterface();for(var a in this.YEXTIF.methods){if(this.filterForMethodsParent(a)){if(Prototype.Browser.IE){c.YEXTIF.addFct(a)}else{c.YEXTIF.methods[a]=this.YEXTIF.methods[a]}}}}catch(b){this.YEXTIF.logError("YoodgetWrapper.publishInterfaces: "+b)}};YoodgetWrapper.prototype.filterForMethodsParent=function(a){if(-1!=a.indexOf("KeyValue")){return(false)}if(-1!=a.indexOf("setUserId")){return(false)}if(a=="allowCookiesForHost"){if((this.yuid!="{mail@yoono.com}")&&(this.yuid!="{music@yoono.com}")&&(this.yuid!="{tasks@yoono.com}")&&(this.yuid!="{news@yoono.com}")){return(false)}}return(this.filterForMethods(a))};YoodgetWrapper.prototype.filterForMethods=function(a){return(true)};YoodgetWrapper.prototype.setTitle=function(a){this.title=a;if(this.titleElt){this.titleElt.update(a)}};YoodgetWrapper.prototype.getTitle=function(){return(this.title)};YoodgetWrapper.prototype.config=function(a){this.yoodget.toggleConfig(a)};YoodgetWrapper.prototype.close=function(){try{YServices.yoodgetInstances.deregisterYoodgetInstance(this);this.yoodget.uninit()}catch(a){this.YEXTIF.logError("YoodgetWrapper.close closing yoodget "+this.yuid+": "+a);this.YEXTIF.logException(a)}this.iframe=null;this.closeThinWrapper();this.domElt.parentNode.removeChild(this.domElt);this.sidebar.saveYoodgetOnTimer();this.sidebar.refreshVisibleWrapperList();this.sidebar.fixLayout(Sidebar.prototype.YOODGET_REMOVED,null);this.sidebar.checkEmptyness(true)};YoodgetWrapper.prototype.onStartDraging=function(){if(this._isDraging){return}this._isDraging=true;var a=this;if(Prototype.Browser.IE){setTimeout(function(){if(a._isDraging){a.setView("reduced")}},200)}else{this.setView("reduced")}};YoodgetWrapper.prototype.onStopDraging=function(){this._isDraging=false;var a=this;window.setTimeout(function(){a.setView("block")},500)};YoodgetWrapper.prototype.startToggleView=function(){};YoodgetWrapper.prototype.doToggleView=function(){return;var a=new Date().getTime();if((a-this.toggleViewStart)<600&&!this._isDraging){this.setView("toggle",YoodgetWrapper.prototype.MANUAL_RESIZE)}};YoodgetWrapper.prototype.setThin=function(){try{if(this.yoodget){this.yoodget.setThinYoodget()}}catch(a){this.YEXTIF.logError("YoodgetWrapper.setThin: "+a)}};YoodgetWrapper.prototype.isVisible=function(){return(!yoono.dom.hasClassName(this.domElt,"wrapperhidden"))};YoodgetWrapper.prototype.isPinnedDown=function(){return(yoono.dom.hasClassName(this.thinWrapperElt,"pinneddown"))};YoodgetWrapper.prototype.pinDown=function(){yoono.dom.addClassName(this.thinWrapperElt,"pinneddown");this.show();var a=this;setTimeout(function(){a.parent.fixLayout(Sidebar.prototype.YOODGET_PINNED_DOWN,this)},200)};YoodgetWrapper.prototype.pinUp=function(){yoono.dom.removeClassName(this.thinWrapperElt,"pinneddown");this.hide();this.parent.fixLayout(Sidebar.prototype.YOODGET_PINNED_UP,null)};YoodgetWrapper.prototype.show=function(){yoono.dom.removeClassName(this.domElt,"wrapperhidden");this.domElt.style.height=this.height;this.setView("block",true);if(this.yoodget){this.yoodget.showOneYoodget()}};YoodgetWrapper.prototype.hide=function(){this.setView("reduced");yoono.dom.addClassName(this.domElt,"wrapperhidden");this.domElt.setAttribute("oldHeight",this.domElt.style.height);this.domElt.style.height=0;this.setThin();if(this.yoodget){this.yoodget.hideOneYoodget()}};YoodgetWrapper.prototype.setFullHeight=function(){var a=this.parent.yoodgetListElt.clientHeight;this.setHeight(a)};YoodgetWrapper.prototype.setLarge=function(){try{this.setView("block");this.yoodget.setLargeYoodget()}catch(a){this.YEXTIF.logError("YoodgetWrapper.setLarge: "+a)}};YoodgetWrapper.prototype.setView=function(a){this.view=a;switch(a){case"reduced":if(this.iframe){this.iframe.style.height="0px";this.domElt.style.height="0px"}yoono.dom.hide(this.resizeHandle);break;case"block":if(this.iframe){this.iframe.style.display="block"}this.setHeight(this.getHeight());yoono.dom.show(this.resizeHandle);break}if(!this.sidebar.isThin()&&this.yoodget){this.yoodget.setView(a)}};YoodgetWrapper.prototype.setHeight=function(a){var b=a;if(b&&this.yoodget){b=this.yoodget.setHeight(b-3)}if(this.iframe){this.iframe.style.height=b+"px"}this.domElt.style.height=a-2+"px";this.height=a;return(a)};YoodgetWrapper.prototype.setWidth=function(){if(this.iframe){this.iframe.style.width=Math.max(0,this.iframe.parentNode.clientWidth-1)+"px";this.iframe.style.left="0";this.iframe.style.top="0"}};YoodgetWrapper.prototype.getWindowType=function(){return(yoono.lang.getObjectClass(this.parent))};YoodgetWrapper.prototype.inSidebar=function(){return("Sidebar"==this.openerType)};function YoodgetInfo(b,a){this.url=b.url;this.instance=b.instance;this.height=b.height;this.view=b.view;this.yuid=b.yuid;this.maxHeight=b.getMaxHeight();this.minHeight=b.getMinHeight();this.userHeight=b.userHeight;this.yuid=b.yuid};